<nav>
    <ul id="primaryNav" class="col{{ tree|length }}" style="padding:20px 0px 0px 10px;">
        {% for t in tree %}
        <li {% if forloop.first %} id="first"{% endif %}>
            <a href="{{ t.link }}" alt="{{ t.alt }}">{{ t.title }}</a>
            {% if t.childs %}
            <ul>
                {% for c1 in t.childs %}
                <li>
                    <a href="{{ c1.link }}" alt="{{ c1.alt }}">{{ c1.title }}</a>
                    {% if c1.childs %}
                    <ul>
                        {% for c2 in c1.childs %}
                        <li>
                            <a href="{{ c2.link }}" alt="{{ c2.alt }}">{{ c2.title }}</a>
                        </li>
                        {% endfor %}
                    </ul>
                    {% endif %}
                </li>
                {% endfor %}
            </ul>
            {% endif %}
        </li>
        {% endfor %}
    </ul>
</nav>